       
       
<template>
    <div class="app-container">
        <levelbar></levelbar>
                <el-tabs v-model="activeName" @tab-click='tabclick'>
                    <el-tab-pane v-for="(item,index) in tabMapOptions" :label="item.label" :key='item.key' :name="item.key">
                        <keep-alive>
                            <!-- <questionCount v-if="activeName=='0'&&index==0">
                            </questionCount> -->
                            <areaCount v-if="activeName=='0'&&index==0">
                            </areaCount>
                            <gradeCount v-if="activeName=='1'&&index==1">
                            </gradeCount>
                        </keep-alive>
                    </el-tab-pane>
                </el-tabs>
    </div>
</template>

<script>
import Levelbar from '../../layout/Levelbar';
import areaCount from './comps/areaCount';
import questionCount from './comps/questionCount';
import gradeCount from './comps/gradeCount';
export default {
    components: { Levelbar, questionCount, areaCount, gradeCount},
    data() {
        return {
            activeName: '0',
            tabMapOptions: [
                // { label: '题库作业分析', key: '0' },
                { label: '区域学校统计', key: '0' },
                { label: '年级教材统计', key: '1' }
            ]
        }
    },
    methods: {
        tabclick(obj) {
            this.activeName = obj.name;
        }
    }
}
</script>

<style rel="stylesheet/scss" lang="scss">
   .app-container{
        position: relative;
        padding: 20px 20px 10px;
        width: 1400px;
        margin: 0 auto;
    }
</style>

